/*
 * DotMaker.fx
 *
 * Created on 18/03/2010, 09:46:05 AM
 */

package util;

/**
 * @author Alex
 */

public class DotMaker {
// create a Dot GUI object
  public function createDot(  x1: Number,  y1:Number, type:Integer ): Dot {
     var d = Dot {
        x: Map.calcGridX(x1)
        y: Map.calcGridY(y1)
        dotType: type
        visible: true
        }

     if ( d.dotType == Map.MAGIC_DOT )
       d.playTimeline();

 // set the dot type in data model
        Map.setCellData( d.x, d.y, d.dotType ) ;

     return d;
   }

}
